import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import "normalize.css"
import router from "./router"
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import AV from "leancloud-storage"
import 'ant-design-vue/dist/antd.css';
import Antd from 'ant-design-vue';
import mitt from "mitt";

const emitter = mitt();
AV.init({
  appId: "VSEAS3cV9Lk0ZXdI1cbuixxW-gzGzoHsz",
  appKey: "bEklyLJSAworXmfEgfmUcR7L",
  serverURL: "https://vseas3cv.lc-cn-n1-shared.com"
});

let app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.config.globalProperties.$bus = emitter;
app.use(pinia);
app.use(router);
app.use(Antd);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.mount('#app');
